<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <style>
      body {
        margin: 0;
      }

      .div1 {
        width: 700px;
        height: 700px;
        background: red;
        /* position: absolute;
        z-index: 0; */
      }

      .div1div1 {
        width: 300px;
        height: 300px;
        background: green;
        position: absolute;
        top: 0px;
        left: 0px;
        z-index: 500;
      }

      .div1div1div1 {
        width: 200px;
        height: 200px;
        background: yellow;
        position: absolute;
        z-index: 10;
      }

      .div2 {
        width: 600px;
        height: 600px;
        background: pink;
        position: absolute;
        z-index: 400;
        top: 0;
      }

      .div2div1 {
        width: 500px;
        height: 500px;
        background: blueviolet;
        position: absolute;
        z-index: 800;
      }
    </style>
  </head>

  <body>
    <div class="div1">
      <div class="div1div1">
        <div class="div1div1div1"></div>
      </div>
    </div>
    <div class="div2">
      <div class="div2div1"></div>
    </div>
  </body>
</html>
